using System;
using ContentRenderingApi.Exceptions;

namespace ContentRenderingApi.NodeData
{
    /// <summary/>
    internal class ParentNodeData : AbstractNodeData
    {
        private int _level;

        /// <summary/>
        internal ParentNodeData(int level)
        {
            this._level = level;
        }

        /// <summary/>
        internal override bool IsParent()
        {
            return true;
        }

        /// <summary/>
        internal override bool IsRoot()
        {
            return false;
        }

        /// <summary/>
        internal override bool IsChild()
        {
            return false;
        }

        /// <summary/>
        internal override string Name
        {
            get { throw new NodeDoesNotHaveTagNameException(); }
        }

        /// <summary/>
        internal override int ParentLevel
        {
            get { return this._level; }
        }
    }
}
